<template>
    <view class="plus-member">
      <view class="member-header">
        <text>PLUS会员</text>
        <view class="member-count">
          <text class="">15家门店可用</text>
          <image
            class="member-icon"
            :src="commonStore.baseImageUrl + 'test-yujia/shop/shop-menu.png'"
          >
          </image>
        </view>
      </view>
      <view class="member-benefits">
        <view class="benefit-item" v-for="(item, index) in benefits" :key="index">
          <image
            :src="item.icon"
            :style="`width:${item.w}rpx;height:${item.h}rpx`"
          ></image>
          <view class="content">
            <text class="title">{{ item.title }}</text>
            <text class="desc">
              {{ item.desc }}
            </text>
          </view>
        </view>
      </view>
    </view>
  </template>
    
    <script setup>
  import { useCommonStore } from "@/store";
  import { ref } from "vue";
  
  const commonStore = useCommonStore();
  
  const benefits = ref([
    {
      icon: commonStore.baseImageUrl + "test-yujia/reservation/gift1.png",
      title: "超级补贴",
      desc: "开通PALS会员 即可领取",
      w: 72,
      h: 72,
    },
    {
      icon: commonStore.baseImageUrl + "test-yujia/index/shop-card-icon.png",
      title: "12项福利",
      desc: "开通PALS会员 即可领取",
      w: 82,
      h: 77,
    },
  
    {
      icon: commonStore.baseImageUrl + "test-yujia/reservation/gift.png",
      title: "12项福利",
      desc: "开通PALS会员 即可领取",
      w: 70,
      h: 67,
    },
  ]);
  </script>
    
  <style lang="scss" scoped>
  .plus-member {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    padding-bottom: 50rpx;
  
    .member-header {
      display: flex;
      justify-content: space-between;
      margin-bottom: 15px;
  
      .member-count {
        font-size: 12px;
        color: #3B3B3B;
        display: flex;
        align-items: center;
      }
      .member-icon {
        width: 20rpx;
        height: 20rpx;
        margin-left: 10rpx;
      }
    }
  
    .member-benefits {
      display: flex;
      justify-content: space-between;
      margin-top: 50rpx;
      align-items: center;
      gap: 12rpx;
  
      .benefit-item {
        text-align: center;
        display: flex;
        flex: 1;
        color: #60702D;
        font-size: 24rpx;
        .content {
          display: flex;
          flex-direction: column;
          justify-content: center;
        }
  
        image {
          width: 72rpx;
          height: 72rpx;
          flex-shrink: 0;
          margin-right: 8rpx;
        }
  
        .desc {
          font-size: 18rpx;
          color: #60702D;
          white-space: pre-line;
        }
      }
    }
  }
  </style>